{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#importing necessary libraries\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "from sklearn import linear_model\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.linear_model import LassoCV\n",
    "from sklearn.pipeline import make_pipeline\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#importing csv files\n",
    "all_site = pd.read_csv(r'all_site.csv')\n",
    "rul = pd.read_csv(r'RUL.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 3341 entries, 0 to 3340\n",
      "Data columns (total 10 columns):\n",
      "index           3341 non-null int64\n",
      "Site            3338 non-null object\n",
      "Event Date      3341 non-null object\n",
      "WUC             3038 non-null object\n",
      "Failure         757 non-null float64\n",
      "R&R             702 non-null float64\n",
      "Action Taken    2480 non-null object\n",
      "Rem Sn          689 non-null object\n",
      "Ins Sn          818 non-null object\n",
      "How Mal         3180 non-null float64\n",
      "dtypes: float64(3), int64(1), object(6)\n",
      "memory usage: 261.1+ KB\n"
     ]
    }
   ],
   "source": [
    "all_site.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>Site</th>\n",
       "      <th>Event Date</th>\n",
       "      <th>WUC</th>\n",
       "      <th>Failure</th>\n",
       "      <th>R&amp;R</th>\n",
       "      <th>Action Taken</th>\n",
       "      <th>Rem Sn</th>\n",
       "      <th>Ins Sn</th>\n",
       "      <th>How Mal</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3220</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7/7/2017</td>\n",
       "      <td>JB200</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>X</td>\n",
       "      <td></td>\n",
       "      <td>804</td>\n",
       "      <td>801.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3239</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8/16/2017</td>\n",
       "      <td>JB200</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>X</td>\n",
       "      <td></td>\n",
       "      <td>627</td>\n",
       "      <td>801.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3244</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8/28/2017</td>\n",
       "      <td>JB200</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>X</td>\n",
       "      <td></td>\n",
       "      <td>626</td>\n",
       "      <td>801.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1700</td>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>10/4/2010</td>\n",
       "      <td>03YR1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1869</td>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>5/3/2011</td>\n",
       "      <td>JA200</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>X</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>799.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   index      Site Event Date              WUC  Failure  R&R Action Taken  \\\n",
       "0   3220       NaN   7/7/2017  JB200                0.0  0.0            X   \n",
       "1   3239       NaN  8/16/2017  JB200                0.0  0.0            X   \n",
       "2   3244       NaN  8/28/2017  JB200                0.0  0.0            X   \n",
       "3   1700  1.00E+01  10/4/2010            03YR1      NaN  NaN          NaN   \n",
       "4   1869  1.00E+01   5/3/2011            JA200      NaN  NaN            X   \n",
       "\n",
       "            Rem Sn Ins Sn  How Mal  \n",
       "0                     804    801.0  \n",
       "1                     627    801.0  \n",
       "2                     626    801.0  \n",
       "3              NaN    NaN      0.0  \n",
       "4              NaN    NaN    799.0  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_site.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Years</th>\n",
       "      <th>Percent_RUL</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>100.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.215131</td>\n",
       "      <td>99.8178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.531525</td>\n",
       "      <td>99.8197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.732868</td>\n",
       "      <td>99.8209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.819157</td>\n",
       "      <td>99.8215</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Years  Percent_RUL\n",
       "0  0.000000     100.0000\n",
       "1  0.215131      99.8178\n",
       "2  0.531525      99.8197\n",
       "3  0.732868      99.8209\n",
       "4  0.819157      99.8215"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rul.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Years</th>\n",
       "      <th>Percent_RUL</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>167.000000</td>\n",
       "      <td>167.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>12.196671</td>\n",
       "      <td>49.658787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>8.138375</td>\n",
       "      <td>36.272862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.363594</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>5.380325</td>\n",
       "      <td>13.344650</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>10.807500</td>\n",
       "      <td>49.882500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>17.845550</td>\n",
       "      <td>85.143450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>29.568500</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            Years  Percent_RUL\n",
       "count  167.000000   167.000000\n",
       "mean    12.196671    49.658787\n",
       "std      8.138375    36.272862\n",
       "min      0.000000     0.363594\n",
       "25%      5.380325    13.344650\n",
       "50%     10.807500    49.882500\n",
       "75%     17.845550    85.143450\n",
       "max     29.568500   100.000000"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#descriptive statistics summary\n",
    "rul.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot of RUL Vs year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x20da71477f0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEKCAYAAAAcgp5RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xd8leX9//HXJyeTDCALAmGDbGSEpSACIqJWad12YIuCv6+K39qvra1aabV11D2qItqCA7E4oA4ciCIOZEMgLCFAIBAgjBAIZFy/P3JAVJCQdZ9z8n4+HnnknDv3fe7PzU3euc51rvu6zTmHiIiErjCvCxARkZqloBcRCXEKehGREKegFxEJcQp6EZEQp6AXEQlxJw16M3vBzPLMLPOYZYlm9qGZrfV/b+hfbmb2uJmtM7NlZtazJosXEZGTq0iL/t/Aed9bdhswyznXDpjlfw4wAmjn/xoDPF09ZYqISGWdNOidc3OA/O8tvhiY5H88CRh5zPLJrtxXQAMzS6uuYkVE5NSFV3K7Rs65XADnXK6ZpfqXNwU2H7Nejn9Z7vdfwMzGUN7qJzY2tleHDh1OuYi8fYfYXlBUoXWjwsNIjI0kITqCyHB9NCEiwW/hwoU7nXMpJ1uvskF/InacZcedY8E5NwGYAJCRkeEWLFhwyjsrKS0je9cBVm3bxzd5hZT6p3M4tggzKCtzzF23k0Wb9rAPiInw0SwxBl9Y2JFajlnf+FX/FlzVp/kp1yMiUpvMbGNF1qts0G83szR/az4NyPMvzwGaHbNeOrC1kvs4qXBfGG1T42ibGnfSdW85tz3r8vazIDufNdv3k7P7wHf+Ah3545Cz+yC3v7mcMIOf9khX619Egl5lg34GMAq4z/99+jHLbzSzV4G+wN4jXTyBoCJ/FAqKivn5xHn84fXlPDBzNclxUaQ3jGFkj6ac3zUNX9jx3rSIiAQuO9nslWY2BTgbSAa2A3cBbwGvAc2BTcBlzrl8MzPgScpH6RwAfu2cO2mfTGW7bmpKWZnj07U7mL54C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NVHecP7NefcX/2Z8CqQCCwGfuGcO1Tp/QRz0IuIyMkFc9eNiIhUgIJeRCTEKehFREKcgl5EJMQp6EVEQpyCXuoMKzfXzEYcs+xyM5vpZV0iNU3DK6VOMbMuwH8onyPFBywBznPOfVOF1ww/Zl4SkYCjoJc6xz99ciEQCxQ45+42s1HADUAk8AVwo3OuzMwmAD2BGGCqc+6v/tfIAZ4FzqP8or104DqgGFjunPtFLR+WyAlV+83BRYLAX4BFwGEgw9/K/ylwhv/m9hMon1LjFeA251y+f96R2WY27Zh7HhQ6584EMLNcoIVz7vCRS9pFAoWCXuoc51yhmU2l/EYVh8zsHKA3sKB8KhVi+HYK7KvMbDTlvytNgE7AkaCfeszLrgBeMrPplE/9IBIwFPRSV5Xx7VwpRvlcSXceu4KZtaP8bj99nHN7zOwlIPqYVQqPeTwcGET5zTzuMLMuzrnSGqte5BRo1I0IfARcbmbJAGaWZGbNgQSgANjnnx1x+PE29t/WMt059zFwK5AC1KuVykUqQC16qfOcc8v9N2X+yMzCKP9A9XpgAeXdNJnAeuDzE7xEOPCKf6rpMOB+/23uRAKCRt2IiIQ4dd2IiIQ4Bb2ISIhT0IuIhDgFvYhIiFPQi4iEOAW9iEiIU9CLiIS4/w+7A6Fo5MN2LQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x20da7144fd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "var = 'Years'\n",
    "data = pd.concat([rul['Percent_RUL'], rul[var]], axis=1)\n",
    "data.plot(x=var, y='Percent_RUL', ylim=(0,100))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Distribution of RUL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x20da723d8d0>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
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xmCZhZYYwIkVkS2OMvv45008E5gMrDBO48gsfx9llEP3plnAUYAxaq6AUC9U5UjIpcB45pdB0jAOzlaPbBeVQudelvw3qXsg/OI920R6e/Ec7a5yddcOTaHjulyliRMd1PjnC18yplh9glV/X4r9WtV1XO2Kq0fiAX4pqquarHdS3CmiHZ4OP/v1CygGngcuBfv/QiOAy1vBpQIHDzPbRvTYdbcZHqCt4AFIpIKICKJZ3sStbAHSBeRKU69Pk6z1SrgG879LhCR4c404edShfde3W1S1Rq8TVa3ikiiqp4GikVk9tl48TZHnc8ZijEBYUnCdHuqugtvU85qEdkGvAF85j7J6r3n9w3AH0Rkq1MvBngM2AVscrqmPkzbZwyPACv9vXCt3nskPAPc5RTdCvzQacJaA/y3qn7SbJWHRaTQ+fexP69hTHvYVOHGGGN8sjMJY4wxPtmFa2M6mTMGI7pF8S2qut2NeIw5H9bcZIwxxidrbjLGGOOTJQljjDE+WZIwxhjjkyUJY4wxPlmSMMYY49P/B5ZpCV5Y1/w6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x20da7284ba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#histogram\n",
    "sns.distplot(rul['Percent_RUL'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Missing Values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Total</th>\n",
       "      <th>%</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Rem Sn</th>\n",
       "      <td>2652</td>\n",
       "      <td>79.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R&amp;R</th>\n",
       "      <td>2639</td>\n",
       "      <td>79.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Failure</th>\n",
       "      <td>2584</td>\n",
       "      <td>77.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ins Sn</th>\n",
       "      <td>2523</td>\n",
       "      <td>75.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Action Taken</th>\n",
       "      <td>861</td>\n",
       "      <td>25.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>WUC</th>\n",
       "      <td>303</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>How Mal</th>\n",
       "      <td>161</td>\n",
       "      <td>4.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Site</th>\n",
       "      <td>3</td>\n",
       "      <td>0.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Event Date</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>index</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Total     %\n",
       "Rem Sn         2652  79.4\n",
       "R&R            2639  79.0\n",
       "Failure        2584  77.3\n",
       "Ins Sn         2523  75.5\n",
       "Action Taken    861  25.8\n",
       "WUC             303   9.1\n",
       "How Mal         161   4.8\n",
       "Site              3   0.1\n",
       "Event Date        0   0.0\n",
       "index             0   0.0"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#missing values\n",
    "total = all_site.isnull().sum().sort_values(ascending=False)\n",
    "percent_1 = all_site.isnull().sum()/all_site.isnull().count()*100\n",
    "percent_2 = (round(percent_1,1)).sort_values(ascending=False)\n",
    "missing_data = pd.concat([total,percent_2], axis=1, keys=['Total', '%'])\n",
    "missing_data.sort_values(ascending=False, by='%')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Replacing missing values in R&R\n",
    "#replacing R&R as 1 for Action Taken =R\n",
    "all_site.loc[(all_site['R&R'].isnull()) & (all_site['Action Taken'] == 'R'), 'R&R'] = 1.0\n",
    "all_site.loc[(all_site['Action Taken'] == 'R'), 'R&R'] = 1.0\n",
    "#replacing other null values with 0\n",
    "all_site.loc[all_site['R&R'].isnull(),'R&R'] = 0.0\n",
    "\n",
    "#Replacing missing values in Ins Sn - To deal with the missing values in Ins Sn creating a new column combining Site,WUC and Ins Sn\n",
    "def str_join(df, sep, *cols):\n",
    "    from functools import reduce\n",
    "    return reduce(lambda x, y: x.astype(str).str.cat(y.astype(str), sep=sep), \n",
    "            [df[col] for col in cols])\n",
    "all_site['WUC-Ins Sn'] = str_join(all_site, '-', 'Site','WUC', 'Ins Sn',)\n",
    "\n",
    "#replacing missing values in Failure\n",
    "all_site.loc[(all_site['R&R']==1.0) | (all_site['Action Taken'] == 'R'), 'Failure'] = 1.0\n",
    "all_site.loc[(all_site['R&R']==1.0), 'Failure'] = 1.0\n",
    "#replacing other null values with 0\n",
    "all_site.loc[all_site['Failure'].isnull(),'Failure'] = 0.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Total</th>\n",
       "      <th>%</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Rem Sn</th>\n",
       "      <td>2652</td>\n",
       "      <td>79.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ins Sn</th>\n",
       "      <td>2523</td>\n",
       "      <td>75.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Action Taken</th>\n",
       "      <td>861</td>\n",
       "      <td>25.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>WUC</th>\n",
       "      <td>303</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>How Mal</th>\n",
       "      <td>161</td>\n",
       "      <td>4.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Site</th>\n",
       "      <td>3</td>\n",
       "      <td>0.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>WUC-Ins Sn</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R&amp;R</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Failure</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Event Date</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>index</th>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Total     %\n",
       "Rem Sn         2652  79.4\n",
       "Ins Sn         2523  75.5\n",
       "Action Taken    861  25.8\n",
       "WUC             303   9.1\n",
       "How Mal         161   4.8\n",
       "Site              3   0.1\n",
       "WUC-Ins Sn        0   0.0\n",
       "R&R               0   0.0\n",
       "Failure           0   0.0\n",
       "Event Date        0   0.0\n",
       "index             0   0.0"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#missing values\n",
    "total = all_site.isnull().sum().sort_values(ascending=False)\n",
    "percent_1 = all_site.isnull().sum()/all_site.isnull().count()*100\n",
    "percent_2 = (round(percent_1,1)).sort_values(ascending=False)\n",
    "missing_data = pd.concat([total,percent_2], axis=1, keys=['Total', '%'])\n",
    "missing_data.sort_values(ascending=False, by='%')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "Good_parts = all_site.loc[(all_site['Failure']== 0.0) & (all_site['R&R'] == 0.0)] \n",
    "Failed_replaced_parts = all_site.loc[(all_site['Failure']== 1.0) & (all_site['R&R'] == 1.0)] "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calculating Used Time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.222982\n",
       "1    1.113543\n",
       "2    1.080711\n",
       "3    7.975376\n",
       "4    7.398085\n",
       "5    6.766074\n",
       "6    5.668947\n",
       "7    5.083447\n",
       "8    5.083447\n",
       "9    4.771546\n",
       "Name: Y, dtype: float64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from datetime import date\n",
    "today = date.today()\n",
    "all_site['Event Date'] = pd.to_datetime(all_site['Event Date'])\n",
    "Y = today - all_site['Event Date']\n",
    "Y = Y.dt.days/365.5\n",
    "Y = Y.rename('Y')\n",
    "Y[0:10]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calculating RUC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    100.195074\n",
       "1    100.264117\n",
       "2    100.280780\n",
       "3     69.344766\n",
       "4     73.174466\n",
       "5     77.256233\n",
       "6     83.930746\n",
       "7     87.203807\n",
       "8     87.203807\n",
       "9     88.845838\n",
       "Name: RUL, dtype: float64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "RUL = -0.0007*Y**4 + 0.0505*Y**3 - 1.0342*Y**2 + 1.5831*Y + 99.715\n",
    "RUL = RUL.rename('RUL')\n",
    "RUL[0:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x20da782f128>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEKCAYAAAAcgp5RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl4VOXd//H3FwIEFdkVFHVQEVwBiVbcHkRcYLDYPm21v1ZReX48tS5VuxhQK66M1tKntPzaiwcXalvFtS6JyOpaQRYBgSDrAAEkAWRTgiz374+ZcIUwIcnMnDkzJ5/XdXFl5sxZvhzHD3fuc+77mHMOEREJrkZ+FyAiIt5S0IuIBJyCXkQk4BT0IiIBp6AXEQk4Bb2ISMAp6EVEAk5BLyIScAp6EZGAy/O7AIB27dq5UCjkdxkiIjllzpw5m5xz7WtbLyuCPhQKMXv2bL/LEBHJKWa2ui7rqetGRCTgFPQiIgGnoBcRCbis6KMXEUnVnj17KC0tpaKiwu9S0i4/P59OnTrRpEmTpLZX0ItIIJSWltKiRQtCoRBm5nc5a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P/ywDXif2621VdZrKIsP6A3Odcxurf5Bt57eKjZVdXvGfZQnWyapzHb8YPBD4iYt3GFdXh+9PRjjnNjrn9jnn9gP/W0Md2XZ+84DvAxNqWifd5zdbg74u0yi8CVTenfADYFpNX0qvxfvbngZKnHOjalinQ+U1BDM7n9i535y5Kg+q5Ugza1H5mtgFuIXVVnsTuDF+980FwLbKLggf1dgKyqbzW03V7+lg4I0E67wLXGlmreNdD1fGl2WcmV0N3At81zn3TQ3r1OX7kxHVrht9r4Y6sm1aln7AEudcaaIPPTm/Xl95TuGK9QBid6+sAO6LL3uY2BcQIJ/Yr/DLgU+Bk32s9WJivwouAObF/wwAfgb8LL7O7cAiYlf8ZwAX+ljvyfE65sdrqjy/Ves1Yg+QWQF8DhT4/H04glhwt6yyLKvOL7F/hDYAe4i1IocQu240FVgW/9kmvm4BMK7KtrfEv8vLgZt9rHc5sf7syu9x5Z1txwHFh/v++FTv8/Hv5wJi4d2xer3x94fkiR/1xpc/V/m9rbKup+dXI2NFRAIuW7tuREQkTRT0IiIBp6AXEQk4Bb2ISMAp6EVEAk5BL1JNfOzAR2bWv8qyH5nZRD/rEkmWbq8UScDMziI2TqMnsdkP5wFXO+dW+FqYSBIU9CI1MLMnga+BI4EdzrlHfC5JJCkKepEaxIefzwW+JTYyeLfPJYkkxZOHg4sEgXPuazObAOxUyEuDitZVAAAATklEQVQu08VYkcPbH/8jkrMU9CIiAaegFxEJOF2MFREJOLXoRUQCTkEvIhJwCnoRkYBT0IuIBJyCXkQk4BT0IiIBp6AXEQk4Bb2ISMD9f5XOsg2HYV8yAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x20da782ce80>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = pd.concat((Y, RUL) , axis=1)\n",
    "data.plot(x='Y', y='RUL', ylim=(0,105))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Lasso Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Alpha (regularization strength) of LASSO regression\n",
    "lasso_eps = 0.0001\n",
    "lasso_nalpha=20\n",
    "lasso_iter=4000\n",
    "\n",
    "# Min and max degree of polynomials features to consider\n",
    "degree_min = 2\n",
    "degree_max = 7\n",
    "\n",
    "# Test/train split\n",
    "X_train, X_test, y_train, y_test = train_test_split(rul['Years'], rul['Percent_RUL'],test_size=0.33)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train = X_train.reshape(-1,1)\n",
    "X_test = X_test.reshape(-1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Make a pipeline model with polynomial transformation and LASSO regression with cross-validation\n",
    "for degree in range(degree_min,degree_max+1):\n",
    "    model = make_pipeline(PolynomialFeatures(degree, interaction_only=False), LassoCV(eps=lasso_eps,n_alphas=lasso_nalpha,max_iter=lasso_iter,\n",
    "normalize=True,cv=5))\n",
    "    model.fit(X_train,y_train)\n",
    "    test_pred = np.array(model.predict(X_test))\n",
    "    RMSE=np.sqrt(np.sum(np.square(test_pred-y_test)))\n",
    "    test_score = model.score(X_test,y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9989612832856536"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_score"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Predict for test data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "Y = Y.reshape(-1,1)\n",
    "predicted_rul = model.predict(Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Site</th>\n",
       "      <th>WUC</th>\n",
       "      <th>Ins Sn</th>\n",
       "      <th>Event Date</th>\n",
       "      <th>Used Life(in Years)</th>\n",
       "      <th>predicted_rul</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>804</td>\n",
       "      <td>2017-07-07</td>\n",
       "      <td>1.222982</td>\n",
       "      <td>97.711919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>627</td>\n",
       "      <td>2017-08-16</td>\n",
       "      <td>1.113543</td>\n",
       "      <td>98.012930</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>626</td>\n",
       "      <td>2017-08-28</td>\n",
       "      <td>1.080711</td>\n",
       "      <td>98.101056</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>03YR1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2010-10-04</td>\n",
       "      <td>7.975376</td>\n",
       "      <td>62.159237</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>JA200</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2011-05-03</td>\n",
       "      <td>7.398085</td>\n",
       "      <td>66.146452</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Site              WUC Ins Sn Event Date  Used Life(in Years)  \\\n",
       "0       NaN  JB200              804 2017-07-07             1.222982   \n",
       "1       NaN  JB200              627 2017-08-16             1.113543   \n",
       "2       NaN  JB200              626 2017-08-28             1.080711   \n",
       "3  1.00E+01            03YR1    NaN 2010-10-04             7.975376   \n",
       "4  1.00E+01            JA200    NaN 2011-05-03             7.398085   \n",
       "\n",
       "   predicted_rul  \n",
       "0      97.711919  \n",
       "1      98.012930  \n",
       "2      98.101056  \n",
       "3      62.159237  \n",
       "4      66.146452  "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prediction = pd.DataFrame(all_site['Site'], columns= ['Site'])\n",
    "prediction['WUC'] = all_site['WUC']\n",
    "prediction['Ins Sn'] = all_site['Ins Sn']\n",
    "prediction['Event Date'] = all_site['Event Date']\n",
    "prediction['Used Life(in Years)'] = Y\n",
    "prediction['predicted_rul'] = predicted_rul\n",
    "predicted_rul = predicted_rul.reshape(-1,1)\n",
    "from sklearn import preprocessing\n",
    "scaler = preprocessing.MinMaxScaler(feature_range=(0, 100))\n",
    "scaler = scaler.fit(predicted_rul)\n",
    "X_scaled = scaler.transform(predicted_rul)\n",
    "prediction['predicted_rul'] = X_scaled\n",
    "prediction.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x20da779aef0>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEKCAYAAAAcgp5RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYi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dNe70iQVi6dCl9+vRRks8hzjmWLVvG0Ucfvd/2eBN9sl03eallc2+GzrotOzj57uRn6FQ35PdvAtC/e3smXZP6YLBI0JTkc0uq/x5aAiGGg9t5M3ReSnNSXrB6877BWxGRTFGir8Nx3b0ZOvde1D/tdSvhi0imKNHH4cJvdKdsXDHh4w5Ne92VCX9XCks1iEjd2rRpA8CaNWu48MIL6yx7//33s3379oTqf+ONNxg+fHjS8VUVCoXYsGFDWuqqpEQfJzPj4UtPYNXdxYHUf+TNrxAqKeXTjYl9wEQaq717E58l17VrV55//vk6yyST6BOxZ8+ewOqujQZjE9S0iRGNhNm+aw99b52a9vpP/+0MAJ68/CROPzJzN5KJxHL7S4tZsmZLWuvs27Udt33rmDrLRKNRhg4dysknn8y8efM48sgjefLJJ+nbty+XX34506ZN45prruHEE0/k6quvpry8nFatWvGXv/yFPn36UFZWxve+9z327NnD0KFD96t3+PDhLFq0iL179zJ69GimTp2KmXHllVfinGPNmjUMHjyYzp07M2PGDKZNm8Ztt93Gzp076dWrF48//jht2rRhypQpXH/99XTu3JkTTqj7BsyxY8eyZs0aotEonTt3ZsiQIcyZM4c//OEPAAwfPpxRo0ZxxhlnpHx9Y1GLPkmtmhcQjYSZPeasQOr/4WPvESop5Z1VG+svLJKHli9fzsiRI1m4cCHt2rXjj3/8I+DdPPTWW29x8cUXM3LkSB566CHmzp3Lvffey09/+lMArrvuOq666iref/99DjnkkJj1jx8/nrKyMubNm8fChQu59NJLufbaa+natSszZsxgxowZbNiwgTvvvJPXXnuNDz74gKKiIu677z527NjBlVdeyUsvvcTMmTP5/PPP6/155s6dy6RJk3j66afTd5HipBZ9ig5p783QmfvJF3z7T2+nvf5L/jIbgCV3nEur5vrnksyqr+UdpB49ejBo0CAAvv/97/Pggw8C8N3vfheAbdu28fbbb3PRRRftO2bnzp0AzJo1i3/84x8A/OAHP2D06NE16n/ttdf4yU9+QkGB9/+qU6dONcrMnj2bJUuW7Itj165dnHLKKSxbtozCwkJ69+69L77x48f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5bJ36tmZ0F+wY4hwJvmVkToIdzbgZwA9ABaIO3TO/Pqiw9fLxf3Zt4XRqY2bFAvzSEuBzoYman+PU2s6+fULUUOCIN56huKlA5MFz152sPrPV/gYwg9kMzMLNuwDbn3F+B+/CeTVqpN96qhyKAEr1kzg+Bm8176v3rwO1+a7Yp8Dcz+xCYB/zeOfcl8Gu8Fu1Cf2rmr/16/gS08btsbsBboro2pWa22v+K9VQqAJz3HNELgXvMbAHe8rynVtaB9+DxdLsdaGVmH5rZYryHXAP8AbjCzGYDhwM7azm+P/C+fz1vAO4GMLOueM8OqK27SRohLVMsUg8zewsY7v8Cymlm9itgvXNuQr2FpdFQi16kfr/EGyhtCDbiTR0V2UctehGRPKcWvYhInlOiFxHJc0r0IiJ5ToleRCTPKdGLiOS5/wNKyVSi9ZsmhwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x20da77a5d68>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = pd.concat([prediction['Used Life(in Years)'], prediction['predicted_rul']], axis=1)\n",
    "data.plot(x='Used Life(in Years)', y='predicted_rul', ylim=(0,101))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Site</th>\n",
       "      <th>WUC</th>\n",
       "      <th>Ins Sn</th>\n",
       "      <th>Event Date</th>\n",
       "      <th>Used Life(in Years)</th>\n",
       "      <th>predicted_rul</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>804</td>\n",
       "      <td>2017-07-07</td>\n",
       "      <td>1.222982</td>\n",
       "      <td>101.171880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>627</td>\n",
       "      <td>2017-08-16</td>\n",
       "      <td>1.113543</td>\n",
       "      <td>101.441588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>JB200</td>\n",
       "      <td>626</td>\n",
       "      <td>2017-08-28</td>\n",
       "      <td>1.080711</td>\n",
       "      <td>101.520550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>03YR1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2010-10-04</td>\n",
       "      <td>7.975376</td>\n",
       "      <td>69.316429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.00E+01</td>\n",
       "      <td>JA200</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2011-05-03</td>\n",
       "      <td>7.398085</td>\n",
       "      <td>72.889001</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Site              WUC Ins Sn Event Date  Used Life(in Years)  \\\n",
       "0       NaN  JB200              804 2017-07-07             1.222982   \n",
       "1       NaN  JB200              627 2017-08-16             1.113543   \n",
       "2       NaN  JB200              626 2017-08-28             1.080711   \n",
       "3  1.00E+01            03YR1    NaN 2010-10-04             7.975376   \n",
       "4  1.00E+01            JA200    NaN 2011-05-03             7.398085   \n",
       "\n",
       "   predicted_rul  \n",
       "0     101.171880  \n",
       "1     101.441588  \n",
       "2     101.520550  \n",
       "3      69.316429  \n",
       "4      72.889001  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prediction.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
